package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.DepartmentEntity;
import com.example.yunJie.digitalSentry.mapper.one.DepartmentMapper;
import com.example.yunJie.digitalSentry.service.DepartmentService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class DepartmentServiceImpl implements DepartmentService {

    private final DepartmentMapper departmentMapper;

    @Override
    public int insert(DepartmentEntity departmentEntity) {
        return departmentMapper.insert(departmentEntity);
    }

    @Override
    public int update(DepartmentEntity departmentEntity) {
        return departmentMapper.update(departmentEntity);
    }

    @Override
    public int deleteById(String id) {
        return departmentMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(List<Integer> idList) {
        return departmentMapper.deleteIdList(idList);
    }

    @Override
    public DepartmentEntity findId(String id) {
        return departmentMapper.findId(id);
    }

    @Override
    public List<DepartmentEntity> findAll(DepartmentEntity departmentEntity) {
        return departmentMapper.findAll(departmentEntity);
    }
}
